<!-- src/App.vue -->
<template>
  <nav>
    <router-link to="/register">注册</router-link>
    <router-link to="/login">登录</router-link>
  </nav>
  <router-view></router-view>
</template>

<script>
export default {
  name: 'App',
};
</script>

<style>
/* 全局样式 */
body {
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
}

/* 导航栏样式 */
nav {
  background-color: #333;
  color: white;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 5px 15px;
  margin: 0 10px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

nav a:hover {
  background-color: #555;
}

/* 路由视图容器样式 */
router-view {
  padding: 20px;
  background-color: white;
  margin: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 媒体查询，用于响应式设计 */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
  }

  nav a {
    margin-bottom: 5px;
  }
}
</style>